<template>
  <div>
    <div class="header-top">
      <span>尚品汇欢迎您！ 请 登录 | 免费注册</span>
      <nav class="header-nav">
        <span>我的订单</span>
        <span>我的购物车</span>
        <span>我的尚品汇</span>
        <span>尚品汇会员</span>
        <span>企业采购</span>
        <span>关注尚品汇</span>
        <span>合作招商</span>
        <span>商家后台</span>
      </nav>
    </div>

     -->
    <div class="header-bottom">
      <router-link to="/">
        <img src="./images/logo.png" alt="logo" />
      </router-link>
  
      <form class="header-search" @submit.prevent="goSearch">
        <input class="header-search-input" type="text" />
        <button class="header-search-btn">搜索</button>
      </form>
    </div>
  </div>
</template>

<script>
export default {
  name: "Header",
  methods: {
    goSearch() {
      this.$router.push("/search");
    },
  },
};
</script>

<style lang="less" scoped>

.header-top {
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  background-color: #eaeaea;
}

.header-nav {
  span {
    margin-right: 10px;
    padding-right: 10px;
    border-right: 1px solid #000;
    &:last-child {
      border-right: none;
      margin-right: 0;
      padding-right: 0;
    }
  }
}

.header-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}
.header-search {
  display: flex;
  align-items: center;
}
.header-search-input {
  width: 500px;
  border: 1px solid red;
  outline: none;
  height: 30px;
  box-sizing: border-box;
  padding: 0 5px;
  font-size: 14px;
}

.header-search-btn {
  width: 80px;
  height: 30px;
  box-sizing: border-box;
  border: none;
  outline: none;
  background: red;
  color: #fff;
}
</style>